package exception.exception01;

import java.io.FileOutputStream;
import java.io.IOException;

public class AutoCloseableDemo {
    public static void main(String[] args) {
        System.out.println("开始执行");
        try(FileOutputStream fos = new FileOutputStream("/a/aa/fos.dat")){
            fos.write(1);
            System.out.println("执行中");
        }catch (IOException e){
            e.printStackTrace();
        }
        System.out.println("执行完毕");




    }
}
